import React from 'react'
import {Form,Input,Checkbox,Button}from 'antd'
const onFinish = (values: any) => {
    console.log('Success:', values);
  };
  
  const onFinishFailed = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
  };
  
  type FieldType = {
    username?: string;
    password?: string;
    
  };
function LoginView(){
return(

    <>
    <div className='login'>
  <h1 className='login-font'>
        <span >用户登录</span>
        </h1>
  
  
    <Form
    name="basic"
  
  
    style={{ maxWidth: 300 }}

    onFinish={onFinish}
    onFinishFailed={onFinishFailed}

  >
    <Form.Item<FieldType>
      label="用户名"
      name="username"
      rules={[{ required: true, message: 'Please input your username!' }]}
    >
      <Input />
    </Form.Item>

    <Form.Item<FieldType>
      label="密码"
      name="password"
      rules={[{ required: true, message: 'Please input your password!' }]}
    >
      <Input.Password />
    </Form.Item>


    <Form.Item wrapperCol={{ offset: 8, span: 16 }}>
      <Button type="primary" htmlType="submit">
    登录
      </Button>
    </Form.Item>
  </Form></div></>
);

}
export default LoginView